<template>
    <div>
        <el-option v-for="op in options" :key="op.value" :label="op.label" :value="op.value">
        </el-option>
    </div>
</template>

<script>

import { getOne } from '@/api/sysEnum';

export default {
    props: ["item"],
    data() {
        return {
            options: []
        }
    },
    methods: {
        getSelect() {
            if (this.item.enumClass) {
                getOne(this.item.enumClass).then(res => {
                    if (res && res.code === 20000) {
                        this.options = res.data;
                    }
                });
            }
        }
    },
    mounted() {
        this.getSelect();
    }
}
</script>

<style scoped></style>